<?php
/* Generieke definitie file */
include_once 'includes/defs/constants.php';
include_once 'includes/classes/datum.php';

require ('includes/connect.php');




?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/xhtml" lang="nl">
<head>
<title>M in Events - Eigen rooster</title>

<LINK rel="stylesheet" href="includes/mystyle.css" type="text/css" /> 

<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="favicon" href="images/favicon.ico" type="image/x-icon" />

</head>

<body>
<div id="wrapper">
	<div id="circle">
		<div id="header">
			<div id="header-left">
				<div id="koptekst">
					Rooster
				</div>
			</div>
			<div id="header-right">
				<a href="optie.php"><img src="images/instellingen.png" border="0"></a>
				<img src="images/faq.png">
				<img src="images/uitloggen.png">
				<div id="naam">
					<p style="font-size: 14px;">Ingelogd als:</br></p>
					<p style="font-size: 26px;"><b>Tim van den Elsen</b></br></p>
				</div>
			</div>
		</div>
		<div id="content-wrapper">
			<div id="menu-left">
				<div id="menu-left-content">
					<a href="http://localhost/minevents-svn/" style="text-decoration: none" >
					<img src="images/home_button.png"> </a>
				</div>
			</div>
			<div id="menu-right1">
				<div id="menu-rooster">
					<img src="images/menu_button.png"/>
				</div>
				<div id="menu-afdeling">
					<img src="images/menu_button.png"/>
				</div>
                            
                    
				
			</div>
			<div id="menu-right2">
				<div id="menu-rooster-text">
					<a href="rooster.php" style="text-decoration: none" >
					Rooster aanmaken </a>
				</div>
				
				<div id="menu-wijzigen-text">
				<a href="overzicht.php" style="text-decoration: none" >
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Overzicht </a>
				</div>
                            
                       
                            
                            
			</div>
			<div id="content">
				<div id="content-koptekst">
					<b> Overzicht </b>
				</div>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                           
                            <?php //if($_GET['next'] == 1 ){ echo  active; } ?>
				<div id="content01">
					<table border="0" cellspacing="5" cellpadding="2">
                                            
                           
                                             
				
    
					
					</table>
				</div>
				<div id="content02">
				<table>
                                    <th>Rooster ID:</th><th>Aanmaak persoon:</th> <th>Aanmaak datum:</th> <th></th>
				 <?php
                 
	$query = "SELECT *,DATE_FORMAT(creatietijd, '%d-%m-%Y %h:%i:%s') AS creatietijd FROM rooster ORDER BY rooster_id DESC LIMIT 0, 10";
	$result = mysql_query($query) or die(mysql_error());
	
	while ($loop = mysql_fetch_assoc($result)) 
	{ 
        $creatietijd = $loop['creatietijd'];
	$aanmaakpersoon = $loop['aanmaakpersoon'];
        $rooster_id = $loop['rooster_id'];

        
	$aantal = mysql_num_rows($result);

	
		if ($aantal == '0') {
		echo "Er staat niets in de database";
		} else 	{
?>
                  
                 
                        <tr>
                            <td><?php echo$loop['rooster_id'];?></td>
                            <td><?php echo$loop['aanmaakpersoon'];?></td>
                            <td><?php echo$loop['creatietijd'];?></td>
                            <td><a href="rooster.php?id=<?php echo$loop['rooster_id'];?>">Bekijk</a></td>
                        </tr>

                    <?php
                }
        }
                    ?>	
                                </table>
                                  
				</div>
			</div>
		</div>
		<div id="footer">
			Realisatie: Stichting Innovision Solutions
		</div>
	</div>
</div>
</body>
</html>